package com.naiterui.ehp.bs.recommend.repository.mysql;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bs.recommend.bean.CommonPrescriptionDetail;

/**
 * 常用处方详情
 * 
 * @author yangfuya
 */
@Repository
public interface ICommonPrescriptionDetailRepository extends BaseJpaRepository<CommonPrescriptionDetail, Long> {

    /**
     * 根据常用处方Id获取处方详情
     * 
     * @param commonPrescriptionId
     * @return
     */
    List<CommonPrescriptionDetail> findByCommonPrescriptionIdOrderByIdAsc(Long commonPrescriptionId);

    /**
     * 根据常用处方Id集合获取处方详情
     *
     * @param commonPrescriptionIds
     * @return
     */
    List<CommonPrescriptionDetail> findByCommonPrescriptionIdIn(List<Long> commonPrescriptionIds);

    /**
     * 根据常用处方id删除
     * 
     * @param commonPrescriptionId
     */
    void deleteByCommonPrescriptionId(Long commonPrescriptionId);
}